$OpenBSD: patch-src_osdep_openbsd_c,v 1.3 2015/01/19 20:44:15 naddy Exp $
--- src/osdep/openbsd.c.orig	Tue Feb 26 19:12:19 2008
+++ src/osdep/openbsd.c	Mon Jan 19 21:39:05 2015
@@ -19,26 +19,25 @@
   */
 #include <sys/types.h>
 #include <sys/endian.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/param.h>
 #include <sys/sysctl.h>
-#include <net/bpf.h>
 #include <sys/socket.h>
+#include <sys/timeout.h>
+#include <sys/ioctl.h>
+#include <net/bpf.h>
 #include <net/if.h>
 #include <net/if_media.h>
-#include <sys/ioctl.h>
 #include <net/if_dl.h>
+#include <net/if_var.h>
 #include <net80211/ieee80211.h>
-#include <net80211/ieee80211_crypto.h>
 #include <net80211/ieee80211_ioctl.h>
 #include <net80211/ieee80211_radiotap.h>
-#include <net80211/ieee80211_proto.h>
+
+#include <errno.h>
+#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <sys/uio.h>
 #include <assert.h>
 #include <ifaddrs.h>
 
@@ -273,7 +272,7 @@ static int obsd_write(struct wif *wi, unsigned char *h
 	if (rc == -1)
 		return rc;
 
-	return 0;
+	return rc;
 }
 
 static void do_free(struct wif *wi)
